#include "mathFunc.h"
extern "C" int nearestPow (int num)
{
    int n = 1;

    while (n < num)
        n <<= 1;
	//n>>=1;

    return n;
}

extern "C" int log2(int num)
{
	int n=0;
	while(num !=1)
	{
		num>>=1;
		n++;
	}
	return n;
}

extern "C" int nearest3root(int num)
{
	int n=1;

	while (n*n*n < num)
		n++;

	//n<<=1;
	return n;
}

std::string number2String(int num)
{
	std::ostringstream stm;
	stm << num;

	return std::string(stm.str());

}
